public class Principal {

    public static void main(String[] args) {
        int numAsterisks = 3;
        int count = 1;
        int countSpace = numAsterisks;

        for (int i = 0; i < numAsterisks; i++) {
            for (int k = 1; k < countSpace; k++) {
                System.out.print(" ");
            }

            for (int j = 1; j <= count; j++) {
                System.out.print("*");
            }
            count = count + 2;
            countSpace = countSpace - 1;
            System.out.println();
        }
    }
}
